<?php 
namespace app\admin\validate;
use think\validate;
class ShopGroupValidate extends Validate{
    //验证规则
    protected $rule = array(
		'group_name' => 'max:50',
		'sort_order'=>'number',
	);
    //验证失败提示信息
    protected $message = array(
		'group_name.max'=>'分组名称的值不能超过50个字符',
		'sort_order.number'=>'排序的值必须是一个整数',
);
    //验证场景
    protected $scene = array(
		'add'=>array('group_name','sort_order'),
		'edit'=>array('id','group_name','sort_order'),
	);

}